package das;

import java.util.Scanner;

public class Zhuche {
		static String user = null;
		static String password = null;
		static int kahao = 0;
		static int max = 9999;
		static int min = 1000;
		static boolean biaoshi = false;
		
	
	
	public static void reg(int id){
		System.out.println("[会员系统>>注册]");
		System.out.println("请输入用户名：");
		Scanner input_name = new Scanner(System.in);
		Zhuche.user = input_name.nextLine();
		
		System.out.println("请输入密码：");
		Scanner input_pwd = new Scanner(System.in);
		Zhuche.password = input_pwd.nextLine();
		
		
		kahao =(int) (Math.random() * (max - min) + min);
		
		
		System.out.println("\n注册成功，请记好您的会员卡号");
		System.out.println("******************************************");
		System.out.println("用户名\t\t密码\t\t会员卡号");
		System.out.println(user + "\t\t" + password + "\t\t" + kahao);
		System.out.println("******************************************");
		biaoshi = true;
		String answer = Chesi.dado();
		if ("n".equals(answer)) {
			System.out.println("***********************");
			System.out.println("系统退出,谢谢使用!");
		} else if ("y".equals(answer)) {
			Denglu.login(id+1);
		}
		
		
	}
}
